package tw.edu.tku.im.maze;
import org.json.JSONException;
import org.json.JSONObject;


public class ChangeTeamRepParser extends PacketParser{
   public static ChangeTeamRepParser INSTANCE = new ChangeTeamRepParser();
   
   private ChangeTeamRepParser() { }
   
   @Override
   public ChangeTeamRep parse(JSONObject jsonObj) throws JSONException {
      JSONObject result = jsonObj.getJSONObject("result");
      int state = result.getInt("state");
      return new ChangeTeamRep(state);
   }

   @Override
   public String acceptName() {
      return "changeTeamResponse";
   }
   

}
